import Cookies from 'js-cookie'

const TokenKey = 'JSESSIONID='

export function getToken() {
  return Cookies.get(TokenKey)
}

const expirationDate = new Date(); // 获取当前时间
expirationDate.setMinutes(expirationDate.getMinutes() + 10); // 设置过期时间

export function setToken(token) {
  return Cookies.set(TokenKey, token, { expires: expirationDate  })
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
